import os, sys;

test_topologies = ('100-n-1-1', '100-n-1-2', '100-n-1-3', '100-n-2-1', '100-n-2-2', '100-n-2-3', '100-n-3-1', '100-n-3-2', '100-n-3-3', '100-n-4-1', '100-n-4-2', '100-n-4-3', '100-1-sq', '100-1-sq-broken-10-1', '100-1-sq-broken-21-1');
test_tc = ('1', '2', '3', '4', '5', '6', '7', '8', '9');

f_output = open("analysis_allpairght.txt", "a");
f_output.flush();

for top in test_topologies:
	N = int(top.split('-')[0]);
	for tc in test_tc:
		common_dirname = "allpair_route-"+top+"/tc"+tc+"/t3/s0";
		print(common_dirname);

		os.system("nice ~/analyze_ght.exe "+common_dirname+" "+str(N));               
		f = open("/home/DBGROUP/svilen/results"+common_dirname+"/routestats_ght.txt", "r");
		l = f.readlines();
		f.close();

		f_output.writelines(l);
		f_output.flush();

f_output.close();
